using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Customer_Message: BusinessObjectBase
	{

		#region InnerClass
		public enum Customer_MessageFields
		{
			ID,
			CustomerID,
			MessageMarketID,
			Date,
			Type,
			Phone,
			Content,
			EventID,
			Deleted
		}
		#endregion

		#region Data Members

			int _iD;
			int? _customerID;
			int? _messageMarketID;
			DateTime? _date;
			int? _type;
			string _phone;
			string _content;
			int? _eventID;
			bool? _deleted;

		#endregion

		#region Properties

		public int  ID
		{
			 get { return _iD; }
			 set
			 {
				 if (_iD != value)
				 {
					_iD = value;
					 PropertyHasChanged("ID");
				 }
			 }
		}

		public int?  CustomerID
		{
			 get { return _customerID; }
			 set
			 {
				 if (_customerID != value)
				 {
					_customerID = value;
					 PropertyHasChanged("CustomerID");
				 }
			 }
		}

		public int?  MessageMarketID
		{
			 get { return _messageMarketID; }
			 set
			 {
				 if (_messageMarketID != value)
				 {
					_messageMarketID = value;
					 PropertyHasChanged("MessageMarketID");
				 }
			 }
		}

		public DateTime?  Date
		{
			 get { return _date; }
			 set
			 {
				 if (_date != value)
				 {
					_date = value;
					 PropertyHasChanged("Date");
				 }
			 }
		}

		public int?  Type
		{
			 get { return _type; }
			 set
			 {
				 if (_type != value)
				 {
					_type = value;
					 PropertyHasChanged("Type");
				 }
			 }
		}

		public string  Phone
		{
			 get { return _phone; }
			 set
			 {
				 if (_phone != value)
				 {
					_phone = value;
					 PropertyHasChanged("Phone");
				 }
			 }
		}

		public string  Content
		{
			 get { return _content; }
			 set
			 {
				 if (_content != value)
				 {
					_content = value;
					 PropertyHasChanged("Content");
				 }
			 }
		}

		public int?  EventID
		{
			 get { return _eventID; }
			 set
			 {
				 if (_eventID != value)
				 {
					_eventID = value;
					 PropertyHasChanged("EventID");
				 }
			 }
		}

		public bool?  Deleted
		{
			 get { return _deleted; }
			 set
			 {
				 if (_deleted != value)
				 {
					_deleted = value;
					 PropertyHasChanged("Deleted");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("ID", "ID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Phone", "Phone",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Content", "Content",1000));
		}

		#endregion

	}
}
